Find the sum of the roots of $\tan^2x-9\tan x+1=0$ that are between $x=0$ and $x=2\pi$ radians.
Explanation: By the quadratic formula,
\[\tan x = \frac{9 \pm \sqrt{77}}{2}.\]Let $r_1 = \frac{9 + \sqrt{77}}{2}$ and $r_2 = \frac{9 - \sqrt{77}}{2}.$  Note that $r_1 r_2 = 1.$

Graphing $y = \tan x,$ we see that $\tan x = r_1$ for two angles in $[0,2 \pi],$ and $\tan x = r_2$ for two angles in $[0,2 \pi].$

[asy]
unitsize(1 cm);

draw(graph(tan,0,1.3),red);
draw(graph(tan,pi - 1.3,1.3 + pi),red);
draw(graph(tan,2*pi - 1.3,2*pi),red);
draw((0,tan(-1.3))--(0,tan(1.3)));
draw((pi/2,tan(-1.3))--(pi/2,tan(1.3)),dashed);
draw((3*pi/2,tan(-1.3))--(3*pi/2,tan(1.3)),dashed);
draw((0,0)--(2*pi,0));
draw((pi,0.2)--(pi,-0.2));
draw((2*pi,0.2)--(2*pi,-0.2));
draw((0,2)--(2*pi,2),blue);
draw((0,1/2)--(2*pi,1/2),blue);

label("$\frac{\pi}{2}$", (pi/2,-0.2), S, UnFill);
label("$\pi$", (pi,-0.2), S);
label("$\frac{3 \pi}{2}$", (3*pi/2,-0.2), S, UnFill);
label("$2 \pi$", (2*pi,-0.2), S);

label("$y = \tan x$", (6.5,-1.5),red);
label("$y = \frac{9 + \sqrt{77}}{2}$", (2*pi,2), E, blue);
label("$y = \frac{9 - \sqrt{77}}{2}$", (2*pi,1/2), E, blue);
[/asy]

Let $\alpha = \arctan r_1,$ and let $\beta = \arctan r_2,$ which are two of the solutions.  Note that
\[\tan \left( \frac{\pi}{2} - \alpha \right) = \frac{\sin (\frac{\pi}{2} - \alpha)}{\cos (\frac{\pi}{2} - \alpha)} = \frac{\cos \alpha}{\sin \alpha} = \frac{1}{\tan \alpha} = \frac{1}{r_1} = r_2.\]It follows that $\beta = \frac{\pi}{2} - \alpha,$ or
\[\alpha + \beta = \frac{\pi}{2}.\]The other two solutions are $\alpha + \pi$ and $\beta + \pi.$  Hence, the sum of all four solutions is
\[\alpha + \beta + \alpha + \pi + \beta + \pi = 2 \alpha + 2 \beta + 2 \pi = \boxed{3 \pi}.\]